fix(data_channel_rpc): avoid using DeadlineExceeded for PSRPC errors#1223
fix(data_channel_rpc): avoid using DeadlineExceeded for PSRPC errors#1223
Conversation
|
| return psrpc.NewErrorf(psrpc.DeadlineExceeded, e.Message, "data", e.Data) | ||
| return psrpc.NewErrorf(psrpc.Canceled, e.Message, "data", e.Data) | ||
| case DataChannelRpcResponseTimeout: | ||
| return psrpc.NewErrorf(psrpc.DeadlineExceeded, e.Message, "data", e.Data) |
There was a problem hiding this comment.
how does that translate to API error? Feels like DeadlineExceeded is the right one and that will translate to Timeout
There was a problem hiding this comment.
"error": "twirp error cancelled: twirp error unknown: Response timeout%!
utils/data_channel_rpc.go
Outdated
| return psrpc.NewErrorf(psrpc.Internal, e.Message, "data", e.Data) | ||
| case DataChannelRpcConnectionTimeout: | ||
| return psrpc.NewErrorf(psrpc.DeadlineExceeded, e.Message, "data", e.Data) | ||
| return psrpc.NewErrorf(psrpc.Canceled, e.Message, "data", e.Data) |
There was a problem hiding this comment.
these args don't make sense for errorf (args 1...n are sprintf template and args for the error message)
No description provided.